export default function(file,callBack){
		uni.getImageInfo({
			src: file.path,
			success(res) {
				var ready = new FileReader();
				ready.readAsDataURL(file);
				ready.onload = function() {
					var re = this.result;
					var w = 100;
					var img = new Image();
					img.src = re;
					img.onload = function() {
						var that = this;
						var w = that.width;
						var	h = that.height;
						var	scale = w / h;// 默认按比例压缩
						w = w > 750 ? 750 : w;
						h = w / scale;
						var quality = 0.8; // 默认图片质量
						var canvas = document.createElement('canvas');//生成canvas
						var ctx = canvas.getContext('2d');
						var anw = document.createAttribute("width");// 创建属性节点
						anw.nodeValue = w;
						var anh = document.createAttribute("height");
						anh.nodeValue = h;
						canvas.setAttributeNode(anw);
						canvas.setAttributeNode(anh);
						ctx.drawImage(that, 0, 0, w, h);
						var base64 = canvas.toDataURL(file.type, quality);
						var arr = base64.split(','),
							mime = arr[0].match(/:(.*?);/)[1],
							bstr = atob(arr[1]),
							n = bstr.length,
							u8arr = new Uint8Array(n);
						while (n--) {
							u8arr[n] = bstr.charCodeAt(n);
						}
						var filePath = new File([u8arr], file.name, {
							type: mime
						});
						filePath = URL.createObjectURL(filePath);
						// console.log(base64);
						// console.log(filePath);
						callBack(filePath);
					}
				}
		
			}
		})
	}